{{!< default}}
{{!-- The tag above means: insert everything in this file
into the {body} of the default.hbs template --}}

{{> site-header}}
{{#author}}
  <section class="main-hero">
    {{> header-background background=cover_image}}
    <div class="main-hero-bg {{#if cover_image}}responsive-header-img{{else}}no-image{{/if}}"></div>

    <div class="d-flex flex-column align-content-center justify-content-center main-hero-content">
      <div class="text-center main-hero-content-avatar">
        {{#if profile_image}}
          <img class="main-hero-content-avatar-img" src="{{profile_image}}" alt="{{name}}"/>
        {{else}}
          <img class="main-hero-content-avatar-img" src="https://static.ghost.org/v3.0.0/images/ghost.png" alt="{{name}}"/>
        {{/if}}
      </div>
      <div class="text-center main-hero-content-title">{{name}}</div>
      <div class="text-center main-hero-content-description">{{bio}}</div>
      {{#if location}}
        <div class="text-center main-hero-content-description">
          <i class="fas fa-map-marker-alt"></i> {{location}}
          <span class="date-divider"></span>
          <i class="fas fa-poll-h"></i> {{plural ../pagination.total empty='没有任何写作' singular='% 篇文章' plural='% 篇文章'}}
        </div>
      {{/if}}
      <div class="text-center main-hero-content-social">
        <a class="site-tooltip main-hero-content-social-links" target="_blank" rel="noreferrer noopener nofollow" href="#RegQQLinkReg" data-toggle="tooltip" data-placement="bottom" title="RegQQTipReg">
          <i class="fab fa-qq"></i>
        </a>
        <a class="site-popover main-hero-content-social-links"
           data-container=".site-wrapper"
           data-toggle="popover"
           data-placement="bottom"
           data-trigger="hover"
           data-content="<div class='hero-social-wechat'><img src='https://img.alicdn.com/imgextra/i4/2038135983/O1CN011u4G8M87EOv3N6Q_!!2038135983.jpg' alt='微信二维码'/></div>"
        >
          <i class="fab fa-weixin"></i>
        </a>
        <a class="site-tooltip main-hero-content-social-links" target="_blank" rel="noreferrer noopener nofollow" href="#RegWeiboLinkReg" data-toggle="tooltip" data-placement="bottom" title="RegWeiboTipReg">
          <i class="fab fa-weibo"></i>
        </a>
        <a class="site-tooltip main-hero-content-social-links" target="_blank" rel="noreferrer noopener nofollow" href="#RegGithubLinkReg" data-toggle="tooltip" data-placement="bottom" title="RegGithubTipReg">
          <i class="fab fa-github"></i>
        </a>
        {{#if website}}
          <a class="site-tooltip main-hero-content-social-links" target="_blank" rel="noreferrer noopener nofollow" href="{{website}}" data-toggle="tooltip" data-placement="bottom" title="个人地址">
            <i class="fas fa-globe-asia"></i>
          </a>
        {{/if}}
        {{#if twitter}}
          <a class="site-tooltip main-hero-content-social-links" target="_blank" rel="noreferrer noopener nofollow" href="{{twitter_url}}" data-toggle="tooltip" data-placement="bottom" title="Twitter">
            <i class="fab fa-twitter"></i>
          </a>
        {{/if}}
        {{#if facebook}}
          <a class="site-tooltip main-hero-content-social-links" target="_blank" rel="noreferrer noopener nofollow" href="{{facebook_url}}" data-toggle="tooltip" data-placement="bottom" title="Facebook">
            <i class="fab fa-facebook"></i>
          </a>
        {{/if}}
      </div>
    </div>

    <div class="main-hero-waves-area">
      <svg class="waves-svg" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 24 150 28" preserveAspectRatio="none" shape-rendering="auto">
        <defs>
          <path id="gentle-wave" d="M -160 44 c 30 0 58 -18 88 -18 s 58 18 88 18 s 58 -18 88 -18 s 58 18 88 18 v 44 h -352 Z"/>
        </defs>
        <g class="parallax">
          <use xlink:href="#gentle-wave" x="48" y="0"/>
          <use xlink:href="#gentle-wave" x="48" y="3"/>
          <use xlink:href="#gentle-wave" x="48" y="5"/>
          <use xlink:href="#gentle-wave" x="48" y="7"/>
        </g>
      </svg>
    </div>
  </section>
{{/author}}

{{!-- The main content area --}}
<main class="main-content">
  <div class="container-sm pb-3 pb-lg-0">
    {{#foreach posts}}
    {{!-- The tag below includes the markup for each post - partials/post-card.hbs --}}
      {{> "post-card"}}
    {{/foreach}}
  </div>

  {{pagination}}
</main>
